﻿/*
 * Author:      Su LingYun
 * CreateTime:  
 * Description: Remoting接口定义，方法调用统一使用可序列化的基础类型做参数，越简单越好
 * 
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Game.Foundation;

namespace Game.Client
{
    public interface IParentClient
    {
        IChildClient ChildClient { get; set; }

        void ChangeReadyStatus(GameStatus target);
        void DoGameOperation(byte[] msg);
        void SendChatMessage(string msg);
    }

    public interface IChildClient
    {
        GameStatus Status { get; set; }
        void Initialize(byte[] msg);
        void ExchangeHand(int seatIndex);
        void ExchangeDesk(int deskId, int seatIndex);
        void GameSynchronize(byte[] msg);
        void GameOver(byte[] msg);
    }

    public interface IMediator
    {
        void RegisterParent(string key, IParentClient parent);
        void UnRegisterParent(string key);
        void RegisterChild(string key, IChildClient child);
        void UnRegisterChild(string key);

        void RequestChangeStatus(string key, GameStatus target);
        void RequestDoOperation(string key, byte[] msg);
        void RequestSendMessage(string key, string msg);

        void InitializeGame(string key, byte[] msg);
        void ExchangeHand(string key, int seatIndex);
        void GameSynchronize(string key, byte[] msg);
        void GameOver(string key, byte[] msg);
    }
}
